#include "Image.h"

Image::Image(int _l, int _h):h(_h), w(_l){
	pic = new unsigned char[3*h*w*sizeof(unsigned char)];
}

void Image::setCouleur(int i, int j, const Couleur &c) {
	pic[3*w*j+3*i]=(unsigned char)((int)(c.getR()*255));
	pic[3*w*j+3*i+1]=(unsigned char)((int)(c.getV()*255));
	pic[3*w*j+3*i+2]=(unsigned char)((int)(c.getB()*255));
}
